{extend name="default/template/base_index"/}

{block name="area_header"}

{/block}

{block name="area_body"}
    {include file="default/Widget/topbar" /}
    <div class="admin-main container-fluid">
        {include file="default/Widget/left" /}
        <div class="admin-main-content">
            {include file="default/Widget/breadcrumb" /}
            <!-- 过滤\查询按钮 -->
            <div class="filter-controls">
                <!-- 日期查询 -->
                <form action="{:url('Store/index')}" method="post" class="form-inline">
                    <div class="form-group">
                        <label>店铺名称</label>
                        <input type="text" name="name" value="{$name}" class="form-control input-sm"
                               placeholder="店铺名称"/>
                    </div>
                    <button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}
                    </button>
                </form>
            </div>
            <!-- 操作按钮 -->
            <div class="btn-controls">
                <a class="btn btn-primary btn-sm" href="{:url('Store/add')}"><i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
            </div>
            <table class="table table-striped table table-hover  table-condensed">
                <thead>
                <tr>
                    <th style="width: 120px;">
                        店铺ID
                    </th>
                    <th style="width: 120px;">
                        店铺名/logo
                    </th>
                    <th style="width: 120px;">
                        客服电话
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                </thead>
                <tbody>
                {empty name="list"}
                    <tr>
                        <td colspan="5" class="text-center">{:L('NO_DATA')}</td>
                    </tr>
                    {else/}
                    {volist name="list" id="vo"}
                        <tr>
                            <td>
                                {$vo.id}
                            </td>
                            <td>{$vo.name}<img class="thumbnail" style="width:60px;height: 60px;"
                                               src="{:getImgUrl($vo['logo'])}" alt='logo'/>
                            </td>
                            <td>
                                {$vo.service_phone}
                            </td>
                            <td>
                                <a href="{:url('MemberGroup/groupIndex',array('store_id'=>$vo['id']))}"
                                   class="btn btn-sm btn-primary hide"><i class="fa fa-group"></i>会员等级管理</a>
                                <a href="{:url('Product/index',array('store_id'=>$vo['id']))}"
                                   class="btn btn-sm btn-primary"><i class="fa fa-building"></i>商品管理</a>
                                <a href="{:url('StoreAccount/index',array('store_id'=>$vo['id']))}"
                                   class="btn btn-sm btn-primary"><i class="fa fa-user"></i>子账号管理</a>

                                {eq name="$vo['uid']" value=":UID"}
                                <a href="{:url('Store/edit',array('id'=>$vo['id']))}" class="btn btn-primary btn-sm"><i
                                        class="fa fa-edit "></i>编辑</a>
                                {/eq}
                                <a href="{:url('Store/delete',array('id'=>$vo['id']))}"
                                   class="ajax-get confirm btn btn-primary btn-sm hidden"><i class="fa fa-trash"></i>删除</a>
                        </tr>
                    {/volist}
                {/empty}
                </tbody>
            </table>
            <div>{$show}</div>
        </div>

        <script type="text/javascript">
        </script>
    </div>
    <!-- END admin-main-content -->
    </div>
    <!-- END admin-main-->
{/block}

{block name="area_footer"}

{/block}